1. Field of the Invention
The present invention relates to a computer system provided with a memory expansion function and, more particularly, to a computer system suitable for an expansion memory to be used in various expanded and extended memory configurations.
2. Description of the Related Art
In recent years, personal computers have an increasing tendency to increase their memory capacity and various types of memory expansion systems have been used. As expanded and extended memory systems, the following three systems have been in practical use.
The first memory expanded system is called EMS (Expanded Memory Specification) system. The system uses part of a memory address space as a window and accesses an expanded memory through the window. The system was developed jointly by three companies of Lotus, Intel and Microsoft and thus also called LIM/EMS. Memory cards (boards) that meet the specifications of the LIM/EMS system are commercially available by Intel and other companies.
The EMS system includes hardware having a paging function and software for controlling it. The software is called EMM (Expanded Memory Manager) and is a resident driver program which can be installed by users.
An example of conventional memory maps using the EMS system is illustrated in FIG. 1 . A part of a standard memory that the CPU can access directly is used as the EMS window, which is referred to as a physical page. The size of the physical page is 16 kbytes and there are four contiguous physical pages. The 64-kbyte area is referred to as a page frame. The expanded memory is accessed in units of 16 kbytes by each physical page and each unit of 16 kbytes of the expanded memory is referred to as a logical page. The CPU can access a maximum of 512 pages through the page frame.
The expanded memory is divided into units of sets for being controlled. One expanded memory system consists of a maximum of four sets each of which is formed of four classes Each of sets has a page control register.
The switching between a physical page and a logical page is carried out by writing the page number of a logical page into the page control register in each of the classes assigned to an I/O port address.
In this case, a memory address space of one megabyte (MB) or more is accessed through the window (page frame). In other words, in practice CPU can access a memory address space of one megabyte or more by accessing the window. Hereinafter, the expanded memory of the EMS system is referred to as a first expanded memory, and a configuration in which all of expanded memories are formed of first expanded memories is referred to as a first expanded memory configuration.
With the second system, a standard memory and an extended memory are allocated within an address space so that they are directly accessed by CPU. Hereinafter, the extended memory according to this second system is referred to as the second extended memory, and a configuration in which all of extended memories are formed of second extended memories is referred to as a second extended memory configuration. In the following description, the first and second systems described above may also be referred to as the expand system and the extend system.
The third system is configured such that part of expanded memory is made up of the first expanded memory and the remaining part thereof is made up of the second extended memory.
Thus, to construct computer systems so that they can execute application programs prepared to accommodate various different types of expanded and extended memories is important for succession to software assets.
However, there would be the possibility of occurrence of malfunctions if the above three types of expanded and extended memories were made available using the same hardware arrangement. For example, MSDOS supports 640 Kbytes, but is made up to access an expanded memory exceeding one megabyte, for example, through a window as shown in FIG. 2. Depending on machines, however, CPU could directly access a memory address space of one megabyte or more. The direct access by CPU might destroy the contents of a data area allocated in the memory exceeding one megabyte through EMM. More specifically, in the prior art, the memory configuration data of the expanded memory and the extended memory is not given to a memory system. This permits the expanded memory to be accessed by both CPU direct access and access through the window. Therefore, the expanded memory cannot automatically be protected from being accessed by CPU direct access, and also the extended memory cannot automatically be protected from being accessed by access through the window.
Furthermore, the prior system cannot detect the boundary between the expanded memory and the extended memory to thereby automatically control access of both the expanded memory and the extended memory.